<template>
  <div class="award-base">
    <div class="award_wrap">
      <div class="award_header">
        <div class="award_header_title">{{ title }}</div>
      </div>
      <div class="consume_base">
        <div class="consume_box">
          <div class="consume_line"></div>
          <div>
            <div class="consume_text">已送出价值</div>
            <div class="consume_num">￥</div>
            <div class="consume_num">0</div>
            <div class="consume_end">的礼品</div>
          </div>
        </div>
      </div>
      <div class="handle_base">
        <div class="handle_des">
          <div>邀请好友报名升级</div>
          <div>
            您当前已邀请
            <span>0</span>
            人，继续加油！
          </div>
        </div>
        <div class="handle_box">
          <div class="left_handle">我的邀请详情</div>
          <div class="right_handle">我的奖励</div>
        </div>
      </div>
      <div class="share_base">
        <div class="share_box">
          <div class="share_item pic_share">
            <div class="share_content">海报邀请</div>
          </div>
          <div class="share_item friends_share">
            <div class="share_content">分享邀请</div>
          </div>
        </div>
      </div>
      <div class="gifts_base">
        <div v-for="(item,index) in awardList" :key="index">
          <div class="gifts_item gifts_active">
            <div class="gifts_cover">
              <img width="100%" :src="item.cover" alt=""/>
            </div>
            <div class="gifts_info">
              <div class="gifts_title">{{ item.title }}</div>
              <div class="gifts_price">价值<span>{{ item.price }}</span></div>
              <div class="gifts_tag">
                <div class="normal_tag">累计邀请{{ item.requirement_invite_number }}人可获得</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Award",
  props: {
    awardList: {
      type: Array,
      default: () => []
    },
    title: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scoped>

.award-base {
  position: relative;
  margin-top: 35px;
  .award_wrap {
    position: relative;
    width: 360px;
    background: linear-gradient(180deg, #fff4e6, #ffeed6);
    border-radius: 12px;
    border: 3px solid #ffb650;
    padding: 0 6px;
    box-sizing: border-box;
    margin: 0 auto;
  }
  .award_header {
    width: 290px;
    height: 48px;
    background: linear-gradient(144deg, red, #ff6f00);
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    margin-top: -25px;
    margin-bottom: 10px;
  }
  .consume_base {
    margin-bottom: 8px;
  }
  .handle_base {
    background-color: #ffefad;
    border-radius: 8px;
    padding: 20px 0;
  }
  .share_base {

  }
  .gifts_base {
    margin-bottom: 15px;
  }
  .award_header_title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
  }
  .consume_box {
    background: linear-gradient(144deg, red, #ff6f00);
    border-radius: 8px;
    padding: 6px 0;
    text-align: center;
    position: relative;
  }
  .consume_text {
    display: inline-block;
    vertical-align: middle;
    color: #fff;
    font-size: 14px;
  }
  .consume_num {
    width: 17px;
    height: 25px;
    background: #fff;
    border-radius: 2px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    color: red;
    font-size: 19px;
    font-weight: 700;
    vertical-align: middle;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .12);
  }
  .consume_end {
    display: inline-block;
    vertical-align: middle;
    color: #fff;
    font-size: 14px;
  }
  .handle_des {
    text-align: center;
    font-size: 16px;
    color: #840000;
    margin-bottom: 13px;
  }
  .handle_box {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    color: #fff;
  }
  .left_handle {
    width: 120px;
    height: 28px;
    background: linear-gradient(223deg, #fa0, #ff4600);
    border-radius: 0 14px 14px 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .right_handle {
    width: 120px;
    height: 28px;
    background: linear-gradient(137deg, #fa0, #ff4600);
    border-radius: 14px 0 0 14px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .share_box {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    padding: 24px 0;
  }
  .pic_share {
    .share_content {
      background: linear-gradient(132deg, red, #ff6f00);
    }
  }
  .share_content {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 46px;
    border-radius: 35px;
    border: 1px solid hsla(0, 0%, 100%, .24);
    color: #fff;
  }
  .share_item {
    width: 140px;
    height: 53px;
    background: linear-gradient(90deg, #ff6735, #fda74d, #ff6130);
    box-shadow: 0 1px 0 0 hsla(0, 0%, 100%, .6);
    padding: 0;
    border-radius: 35px;
    margin: 0;
  }
  .friends_share {
    .share_content {
      background: linear-gradient(132deg, red, #ff6f00);
    }
  }
  .gifts_item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #fff;
    box-sizing: border-box;
    padding: 12px;
    display: flex;
    margin-bottom: 15px;
  }
  .gifts_active {
    border: 4px solid #ff0707;
  }
  .gifts_cover {
    width: 96px;
    height: 96px;
    border-radius: 3px;
  }
  .gifts_info {
    flex: 1;
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
  }
  .gifts_title {
    font-size: 15px;
    color: #333;
    font-weight: 700;
    display: -webkit-box;
    word-break: break-all;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .gifts_price {
    color: #333;
    font-size: 15px;
  }
  .gifts_tag {
    display: flex;
  }
  .normal_tag {
    border-radius: 4px;
    padding: 3px 5px;
    box-sizing: border-box;
    color: #fff;
    font-size: 12px;
    background: linear-gradient(144deg, red, #ff6f00);
  }
}
</style>
